﻿using GalaSoft.MvvmLight;
using System.Collections.Generic;

namespace WebCrawler.Model
{
    public class BaiduSpeechModel : ObservableObject
    {
        public string APIKey
        {
            get { return _apiKey; }
            set { _apiKey = value; RaisePropertyChanged(() => APIKey); }
        }
        private string _apiKey = "IG5gabUqMs3lBSBx32RetG48"; // 9IgGIGE4DjX32ek7FQKEpGIn

        public string SecretKey
        {
            get { return _secretKey; }
            set { _secretKey = value; RaisePropertyChanged(() => SecretKey); }
        }
        private string _secretKey = "cGUA8ODF0rhGIVc1PcMrRbtUdPW7iHU4"; // u7qTMbLieDAUtGXpK5U05n51CyGtwneI

        /// <summary>
        /// 开放平台获取到的开发者access_token（必填）
        /// </summary>
        public string Token
        {
            get { return _token; }
            set { _token = value; RaisePropertyChanged(() => Token); }
        }
        private string _token;

        /// <summary>
        /// 用户唯一标识（必填）
        /// 用来计算UV值。建议填写能区分用户的机器 MAC 地址或 IMEI 码，长度为60字符以内
        /// </summary>
        public string Cuid
        {
            get { return _cuid; }
            set { _cuid = value; RaisePropertyChanged(() => Cuid); }
        }
        private string _cuid = "00-00-00-00-00-00";

        /// <summary>
        /// 客户端类型（必填）
        /// web端 固定值1
        /// </summary>
        public string Ctp
        {
            get { return _ctp; }
            set { _ctp = value; RaisePropertyChanged(() => Ctp); }
        }
        private string _ctp = "1";

        /// <summary>
        /// 语言选择（必填）
        /// 目前只有中英文混合模式，填写固定值zh
        /// </summary>
        public string Lan
        {
            get { return _lan; }
            set { _lan = value; RaisePropertyChanged(() => Lan); }
        }
        private string _lan = "zh";

        /// <summary>
        /// 语速，取值0-15，默认为5中语速（选填）
        /// </summary>
        public string Spd
        {
            get { return _spd; }
            set { _spd = value; RaisePropertyChanged(() => Spd); }
        }
        private string _spd = "5";

        /// <summary>
        /// 音调，取值0-15，默认为5中语调（选填）
        /// </summary>
        public string Pit
        {
            get { return _pit; }
            set { _pit = value; RaisePropertyChanged(() => Pit); }
        }
        private string _pit = "5";

        /// <summary>
        /// 音量，取值0-15，默认为5中音量（选填）
        /// </summary>
        public string Vol
        {
            get { return _vol; }
            set { _vol = value; RaisePropertyChanged(() => Vol); }
        }
        private string _vol = "5";

        /// <summary>
        /// 音频格式（选填）
        /// 3 ：mp3(默认)，4 ：pcm-16k，5 ：pcm-8k，6 ：wav（内容同pcm-16k）
        /// 注意aue=4或者6是语音识别要求的格式，但是音频内容不是语音识别要求的自然人发音，所以识别效果会受影响
        /// </summary>
        public string Aue
        {
            get { return _aue; }
            set { _aue = value; RaisePropertyChanged(() => Aue); }
        }
        private string _aue = "3";

        /// <summary>
        /// 发音人
        /// 基础音库：度小宇=1，度小美=0，度逍遥(基础)=3，度丫丫=4
        /// 精品音库：度逍遥(精品)=5003，度小鹿=5118，度博文=106，度小童=110，度小萌=111，度米朵=103，度小娇=5
        /// </summary>
        public ComplexInfoModel Speaker
        {
            get { return _speaker; }
            set { _speaker = value; RaisePropertyChanged(() => Speaker); }
        }
        private ComplexInfoModel _speaker;

        private List<ComplexInfoModel> _speakerList;
        public List<ComplexInfoModel> SpeakerList
        {
            get { return _speakerList; }
            set { _speakerList = value; RaisePropertyChanged(() => SpeakerList); }
        }

        /// <summary>
        /// 合成的文本，使用UTF-8编码（必填）
        /// 小于2048个中文字或者英文数字，文本在百度服务器内转换为GBK后，长度必须小于4096字节（5003、5118发音人需小于512个中文字或者英文数字）
        /// </summary>
        public string Tex
        {
            get { return _tex; }
            set { _tex = value; RaisePropertyChanged(() => Tex); }
        }
        private string _tex;
    }
}